package ptij.vocoder.baseModel.lp_analysis;

import ptolemy.actor.*;
import ptolemy.kernel.*;
import ptolemy.kernel.util.*;
import ptolemy.data.ObjectToken;
import ptolemy.data.type.*;

import ptij.vocoder.baseModel.*;

//////////////////////////////////////////////////////////////////////////
//// Az_lsp
/**

@author Ivan Jeukens
@version v 0.1 07/08/2003
*/
public class Az_lsp extends TypedAtomicActor {

    public Az_lsp(CompositeEntity container, String name) throws
            IllegalActionException, NameDuplicationException {
        super(container, name);

        A = new TypedIOPort(this, "A", true, false);
        A.setTypeEquals(BaseType.OBJECT);

        old_lsp = new TypedIOPort(this, "old_lsp", true, false);
        old_lsp.setTypeEquals(BaseType.OBJECT);

        lsp = new TypedIOPort(this, "lsp", false, true);
        lsp.setTypeEquals(BaseType.OBJECT);
    }

    ///////////////////////////////////////////////////////////////////
    ////                     ports and parameters                  ////

    // Input ports
    public TypedIOPort A;
    public TypedIOPort old_lsp;

    // Output Ports
    public TypedIOPort lsp;

    ///////////////////////////////////////////////////////////////////
    ////                         public methods                    ////

    public void fire() throws IllegalActionException {
        ObjectToken obj = (ObjectToken) A.get(0);
        Short [] arg1 = (Short []) obj.getValue();

        obj = (ObjectToken) old_lsp.get(0);
        Short [] arg2 = (Short []) obj.getValue();

        Short [] arg3 = new Short[Cnst.M];

        _az_lsp(arg1, arg3, arg2);

        obj = new ObjectToken(arg3);
        lsp.broadcast(obj);
    }

    ///////////////////////////////////////////////////////////////////
    ////                         private methods                   ////

    private void _az_lsp(Short [] a, Short [] lsp, Short [] old_lsp) {
        
        
        
    }

    ///////////////////////////////////////////////////////////////////
    ////                         private variables                 ////

}
